package com.dmitriyp.movie.dao;

/**
 * Order is used for set criteria for sorting results of {@link IMovieManager}
 * 
 * @author Dmitriy
 * 
 */
public final class Order {

	private final Type type;
	private String propertyName;

	public Order(Type type, String proeprtyName) {
		this.type = type;
		this.propertyName = proeprtyName;
	}

	public String getPropertyName() {
		return propertyName;
	}

	public void setPropertyName(String propertyName) {
		this.propertyName = propertyName;
	}

	public Type getType() {
		return type;
	}

	public static enum Type {
		ASC, DESC;
	}
}
